package com.fingard.dsp.bank.reqrespobj.contract;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.contract.detail.ReqContractDetail;
import com.fingard.xml.XmlTextReader;

public class ReqContract extends RequestBase {
	private XmlTextReader xmlReader;
	public ReqContractDetail contractDetail = null;
	
	public ReqContract(){
		
	}

	public ReqContract(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
		reqHeader = p_header;
		xmlReader = p_xmlReader;

		if (xmlReader.read(PATH_Detail)) {
			contractDetail = new ReqContractDetail(xmlReader.readedXElement, reqHeader.transType, reqHeader.bankCode);
		} else {
			throw new Exception("不存在节点：" + PATH_Detail);
		}
	}
}
